<?php if (Yii::app()->user->hasFlash("success")):?>
		<div class="alert alert-success">
			<a class="close" data-dismiss="alert">&times;</a>
			<strong>Thành công!</strong> <?php echo Yii::app()->user->getFlash("success"); ?>
		</div>
<?php elseif(Yii::app()->user->hasFlash("error")): ?>
	<div class="alert alert-error">
		<a class="close" data-dismiss="alert">&times;</a>
		<strong>Lỗi!</strong> <?php echo Yii::app()->user->getFlash("error"); ?>
	</div>
<?php endif; ?>
<?php $form=$this->beginWidget('CActiveForm', array(
    'enableAjaxValidation'=>true,
)); ?>
<div class="row-fluid">
	<div class="span12 widget">
        <div class="widget-header">
            <span class="title">
                <i class="icol-table"></i> Quản lý chuyên mục sản phẩm
            </span>
			<div class="toolbar">
				<div class="btn-group">
					<span class="btn" rel="popover" data-trigger="hover" data-placement="left" data-content="&lt;code&gt;table&lt;/code&gt;" title="Basic Table">
						Show Code
					</span>
				</div>
			</div>
        </div>
        <div class="widget-content table-container">
            <?php
				$this->widget('zii.widgets.grid.CGridView', array(
				    'id'=>'location-grid',
				    'dataProvider'=>$model->search(),
				    'filter'=> $model,
				    'htmlOptions'=>array(),
				    'pager'=>array(
				        'maxButtonCount'=>'7',
				    ),
				    'columns' => array(
				    	'name',
				    	'description',
				    	 array(
				            'class'=>'CButtonColumn'
				        ),
					)
				));
			?>
        </div>
    </div>
</div>


<script>
function reloadGrid(data) {
    $.fn.yiiGridView.update('location-grid');
}
</script>
<?php $this->endWidget(); ?>

